package com.shou.service;


import com.shou.mapper.StudentMapper;
import com.shou.pojo.DailyTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StudentServiceImpl implements StudentService {

    private final StudentMapper studentMapper;

    @Autowired
    public StudentServiceImpl(StudentMapper studentMapper) {
        this.studentMapper = studentMapper;
    }

    @Override
    public void applyForActivity(int studentId, int activityId) {
        studentMapper.applyForActivity(studentId, activityId);
    }

    @Override
    public void cancelApplication(int studentId, int activityId) {
        studentMapper.cancelApplication(studentId, activityId);
    }

    @Override
    public void applyForDailyTask(int studentId, DailyTask dailyTask) {
        studentMapper.applyForDailyTask(studentId, dailyTask);
    }

    @Override
    public void updatePersonalInfo(int studentId, String name, int age) {
        studentMapper.updatePersonalInfo(studentId, name, age);
    }

    // 其他业务逻辑方法...

}